﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UNSWThink
{
   /// <summary>
   /// Object that represents a Class entry in the database
   /// </summary>
   public class Class
   {
      private int id;
      private int courseID;
      private DateTime startTime;
      private DateTime finishTime;
      private int week;
      private string name;
      private string comment;

      /// <summary>
      /// Default constructor
      /// </summary>
      public Class()
      {
         id = 0;
         courseID = 0;
         startTime = new DateTime();
         finishTime = new DateTime();
         week = 0;
         name = String.Empty;
         comment = String.Empty;
      }

      /// <summary>
      /// Alternate constructor
      /// </summary>
      /// <param name="id">
      /// ID of the record
      /// </param>
      /// <param name="courseID">
      /// ID of a related course
      /// </param>
      /// <param name="startTime">
      /// Start time of the class
      /// </param>
      /// <param name="finishTime">Finish time of the class
      /// </param>
      /// <param name="week">
      /// Week the class is run
      /// </param>
      /// <param name="name">
      /// Name of the class (Optional: If empty string database will default to "NONE")
      /// </param>
      /// <param name="comment">
      /// Any comments that the instructor would like to make about the class 
      /// (Optional: If empty string database will default to "NONE")
      /// </param>
      public Class(int id, int courseID, DateTime startTime, DateTime finishTime, int week, string name, string comment)
      {
         this.id = id;
         this.courseID = courseID;
         this.startTime = startTime;
         this.finishTime = finishTime;
         this.week = week;
         this.name = name;
         this.comment = comment;
      }

      /// <summary>
      /// Gets or sets the ID
      /// </summary>
      public int ID
      {
         get
         {
            return id;
         }
         set
         {
            id = value;
         }
      }

      /// <summary>
      /// Gets or sets the course ID
      /// </summary>
      public int CourseID
      {
         get
         {
            return courseID;
         }
         set
         {
            courseID = value;
         }
      }

      /// <summary>
      /// Gets or sets the starting time
      /// </summary>
      public DateTime StartTime
      {
         get
         {
            return startTime;
         }
         set
         {
            startTime = value;
         }
      }

      /// <summary>
      /// Gets or sets the finish time
      /// </summary>
      public DateTime FinishTime
      {
         get
         {
            return finishTime;
         }
         set
         {
            finishTime = value;
         }
      }

      /// <summary>
      /// Gets or sets the week
      /// </summary>
      public int Week
      {
         get
         {
            return week;
         }
         set
         {
            week = value;
         }
      }

      /// <summary>
      /// Gets or sets the name
      /// </summary>
      public string Name
      {
         get
         {
            return name;
         }
         set
         {
            name = value;
         }
      }

      /// <summary>
      /// Gets or sets the comment
      /// </summary>
      public string Comment
      {
         get
         {
            return comment;
         }
         set
         {
            comment = value;
         }
      }
   }
}
